<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位布局</title>
    <style>
        div{
            margin: 10px;
        }
        .box{
            height: 400px;
            border: 1px solid red;

            position: relative;
        }
        .box1{
            height: 100px;
            width:80%;
            background-color: blue;

            /* 绝对定位 */
            /* position: absolute;
            top:100px;
            left:100px; */
        }

        .box2{
            height: 100px;
            width:80%;
            background-color: pink;

            /* 相对定位 */
            /* position: relative;
            top:20px;
            left:50px; */
        }

        .box3{
            height: 100px;
            width:80%;
            background-color: #cb2abb;

            position: absolute;
            bottom: 20px;
            right: 10px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>
</html>